<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
      <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <style>
        .row {
          
            margin: 0 auto;
        }


        .agencyM_table tr th {
            text-align: center;
        }
        .textR{text-align: right;}
      
    </style>


</head>

<body class="white-bg">
<div class="white-bg setRemindPeopleK">
<div class="page-heade">
       <h2 class="title_color text-center">导购网点设定</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered">
            <tr>
                <td class="textR"><label for="">经销商编号:</label></td>
                <td><input type="text" class="form-control textW" name="jxs_sn" value="{$jxs_sn}"></td>
                <td class="textR"><label for="">经销商名称:</label></td>
                <td><input type="text" class="form-control textW" name="jxs_title" value="{$jxs_title}"></td>
                <td class="textR"><label for="">网络编号:</label></td>
                <td><input type="text" class="form-control textW" name="sn" value="{$sn}"></td>
            </tr>
            <tr>
                <td class="textR"><label for="">网点名称:</label></td>
                <td><input type="text" class="form-control textW" name="title" value="{$title}"></td>
                <td class="textR"><label for="">系统名称:</label></td>
                <td><input type="text" class="form-control textW" name="system_title" value="{$system_title}"></td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td colspan="6" class="text-center">  <button class="btn btn-info  query">查询</button><span class="lr_5"></span>
            <button class="btn btn-info  emptyIf" id="reset">清空查询条件</button></td>
            </tr>
        </table>

    </form>

    <p>共有导购网点283个</p>

    <table class="table table-striped table-bordered table-hover bud_hei text-center" >

            <thead>
                <tr class="info">
                    <th class="text-center">No.</th>
                    <th class="text-center">网点编号</th>
                    <th class="text-center">网点名称</th>
                    <th class="text-center">所属分区</th>
                    <th class="text-center">所属省份</th>
                    <th class="text-center">所属城市</th>
                    <th class="text-center">所属经销商</th>
                    <th class="text-center">所属系统</th>
                    <th class="text-center">是否为导购网点</th>
                    <th class="text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                {volist name="data" id="row" key="k"}
                <tr class="angency_tableInfo">
                    <td class="NoId">{$k}</td>
                    <td>{$row.sn}</td>
                    <td><a href="javascript:;" class="netNameA">{$row.title}</a></td>
                    <td>{$row.zoning}</td>
                    <td><a href="javascript:;">{$row.provice}</a></td>
                    <td>{$row.city}</td>
                    <td>{$row.system_jxs_title}</td>
                    <td>{$row.system_title}</td>
                    <td>{if $row.guide==1}是{else}否{/if}</td>
                    <td>
                        {if $row.guide==0}
                        <a href="{:url('delete',['id'=>$row.id])}" class="setguide">设定为导购网点</a>
                        {else}
                        <a href="{:url('undelete',['id'=>$row.id])}" class="setguide">取消设定为导购网点</a>
                        {/if}
                    </td>
                </tr>
                {/volist}
            </tbody>
        </table>
       <div class="row text-center" id="pageText" style="padding: 0;margin: 0;">
				<div class="col-sm-6 text-left"><div class="padding-10 countSize">共{$count}条记录，{$maxpage}页&nbsp;&nbsp;</div></div>
				<div class="col-sm-6 text-right">{$page}</div>
			</div>

</div>

<!-- 全局js -->
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    $(document).ready(function () {
        //设定为导购网点
        $('.setguide').click(function () {
            var link = $(this).attr('href')
            swal({
                title: "您确定设定吗",
                text: "",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "确定",
                closeOnConfirm: false
            }, function (isConfirm) {
                if(isConfirm){
                    $.ajax({
                        'type':'post',
                        'url':link,
                        'dataType':'json',
                        'success':function (data) {
                            if(data.success){
                                location.reload()
                            }else
                                swal(data.msg, "", "error");
                        }
                    })
                }

            });
            return false
        });
        //清除查询条件
        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })
</script>
</body>

</html>